/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 * 
 * $Id: Configurable.java 58 2007-01-23 19:31:08Z jack.rybicki $
 */
package logmatcher;

import org.apache.commons.configuration.Configuration;


/**
 * Represents all objects capable of initializing themselfs according to passed Configuration.
 *
 * @version $Revision: 58 $
 */
public interface Configurable {
    //~ Methods --------------------------------------------------------------------------------------------------------

    /**
     *  Read configuration from passed <code>Properties</code> object. Configuration elements are recognized by
     *  prefix passed as a second argument.
     *
     *  @param config configuration elements container
     *  @param id string recognized as prefix for configuration elements for this filter
     *
     *  @throws InitializationException if unable to initialize object due to some error or missing values.
     */
    void configure(Configuration config, String id) throws InitializationException;
}
